package cn.tedu.spring;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringRunner {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ac
                = new AnnotationConfigApplicationContext(SpringConfig.class);

        // 当写完了值，却还没有声明变量时，在值后输入 .var 并回车，会自动声明变量
        UserMapper bean = (UserMapper) ac.getBean("userMapper");

        System.out.println(bean);

        ac.close();
    }
}
